package com.xqls.dal.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class CostExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CostExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andCostIdIsNull() {
            addCriterion("cost_id is null");
            return (Criteria) this;
        }

        public Criteria andCostIdIsNotNull() {
            addCriterion("cost_id is not null");
            return (Criteria) this;
        }

        public Criteria andCostIdEqualTo(Integer value) {
            addCriterion("cost_id =", value, "costId");
            return (Criteria) this;
        }

        public Criteria andCostIdNotEqualTo(Integer value) {
            addCriterion("cost_id <>", value, "costId");
            return (Criteria) this;
        }

        public Criteria andCostIdGreaterThan(Integer value) {
            addCriterion("cost_id >", value, "costId");
            return (Criteria) this;
        }

        public Criteria andCostIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("cost_id >=", value, "costId");
            return (Criteria) this;
        }

        public Criteria andCostIdLessThan(Integer value) {
            addCriterion("cost_id <", value, "costId");
            return (Criteria) this;
        }

        public Criteria andCostIdLessThanOrEqualTo(Integer value) {
            addCriterion("cost_id <=", value, "costId");
            return (Criteria) this;
        }

        public Criteria andCostIdIn(List<Integer> values) {
            addCriterion("cost_id in", values, "costId");
            return (Criteria) this;
        }

        public Criteria andCostIdNotIn(List<Integer> values) {
            addCriterion("cost_id not in", values, "costId");
            return (Criteria) this;
        }

        public Criteria andCostIdBetween(Integer value1, Integer value2) {
            addCriterion("cost_id between", value1, value2, "costId");
            return (Criteria) this;
        }

        public Criteria andCostIdNotBetween(Integer value1, Integer value2) {
            addCriterion("cost_id not between", value1, value2, "costId");
            return (Criteria) this;
        }

        public Criteria andCloseMothIsNull() {
            addCriterion("close_moth is null");
            return (Criteria) this;
        }

        public Criteria andCloseMothIsNotNull() {
            addCriterion("close_moth is not null");
            return (Criteria) this;
        }

        public Criteria andCloseMothEqualTo(Date value) {
            addCriterionForJDBCDate("close_moth =", value, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andCloseMothNotEqualTo(Date value) {
            addCriterionForJDBCDate("close_moth <>", value, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andCloseMothGreaterThan(Date value) {
            addCriterionForJDBCDate("close_moth >", value, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andCloseMothGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("close_moth >=", value, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andCloseMothLessThan(Date value) {
            addCriterionForJDBCDate("close_moth <", value, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andCloseMothLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("close_moth <=", value, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andCloseMothIn(List<Date> values) {
            addCriterionForJDBCDate("close_moth in", values, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andCloseMothNotIn(List<Date> values) {
            addCriterionForJDBCDate("close_moth not in", values, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andCloseMothBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("close_moth between", value1, value2, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andCloseMothNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("close_moth not between", value1, value2, "closeMoth");
            return (Criteria) this;
        }

        public Criteria andUnitPriceIsNull() {
            addCriterion("unit_price is null");
            return (Criteria) this;
        }

        public Criteria andUnitPriceIsNotNull() {
            addCriterion("unit_price is not null");
            return (Criteria) this;
        }

        public Criteria andUnitPriceEqualTo(Double value) {
            addCriterion("unit_price =", value, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andUnitPriceNotEqualTo(Double value) {
            addCriterion("unit_price <>", value, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andUnitPriceGreaterThan(Double value) {
            addCriterion("unit_price >", value, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andUnitPriceGreaterThanOrEqualTo(Double value) {
            addCriterion("unit_price >=", value, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andUnitPriceLessThan(Double value) {
            addCriterion("unit_price <", value, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andUnitPriceLessThanOrEqualTo(Double value) {
            addCriterion("unit_price <=", value, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andUnitPriceIn(List<Double> values) {
            addCriterion("unit_price in", values, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andUnitPriceNotIn(List<Double> values) {
            addCriterion("unit_price not in", values, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andUnitPriceBetween(Double value1, Double value2) {
            addCriterion("unit_price between", value1, value2, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andUnitPriceNotBetween(Double value1, Double value2) {
            addCriterion("unit_price not between", value1, value2, "unitPrice");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsIsNull() {
            addCriterion("withdrawals is null");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsIsNotNull() {
            addCriterion("withdrawals is not null");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsEqualTo(Double value) {
            addCriterion("withdrawals =", value, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsNotEqualTo(Double value) {
            addCriterion("withdrawals <>", value, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsGreaterThan(Double value) {
            addCriterion("withdrawals >", value, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsGreaterThanOrEqualTo(Double value) {
            addCriterion("withdrawals >=", value, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsLessThan(Double value) {
            addCriterion("withdrawals <", value, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsLessThanOrEqualTo(Double value) {
            addCriterion("withdrawals <=", value, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsIn(List<Double> values) {
            addCriterion("withdrawals in", values, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsNotIn(List<Double> values) {
            addCriterion("withdrawals not in", values, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsBetween(Double value1, Double value2) {
            addCriterion("withdrawals between", value1, value2, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andWithdrawalsNotBetween(Double value1, Double value2) {
            addCriterion("withdrawals not between", value1, value2, "withdrawals");
            return (Criteria) this;
        }

        public Criteria andCostSettlementIsNull() {
            addCriterion("cost_settlement is null");
            return (Criteria) this;
        }

        public Criteria andCostSettlementIsNotNull() {
            addCriterion("cost_settlement is not null");
            return (Criteria) this;
        }

        public Criteria andCostSettlementEqualTo(Double value) {
            addCriterion("cost_settlement =", value, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andCostSettlementNotEqualTo(Double value) {
            addCriterion("cost_settlement <>", value, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andCostSettlementGreaterThan(Double value) {
            addCriterion("cost_settlement >", value, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andCostSettlementGreaterThanOrEqualTo(Double value) {
            addCriterion("cost_settlement >=", value, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andCostSettlementLessThan(Double value) {
            addCriterion("cost_settlement <", value, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andCostSettlementLessThanOrEqualTo(Double value) {
            addCriterion("cost_settlement <=", value, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andCostSettlementIn(List<Double> values) {
            addCriterion("cost_settlement in", values, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andCostSettlementNotIn(List<Double> values) {
            addCriterion("cost_settlement not in", values, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andCostSettlementBetween(Double value1, Double value2) {
            addCriterion("cost_settlement between", value1, value2, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andCostSettlementNotBetween(Double value1, Double value2) {
            addCriterion("cost_settlement not between", value1, value2, "costSettlement");
            return (Criteria) this;
        }

        public Criteria andDeviceNoIsNull() {
            addCriterion("device_no is null");
            return (Criteria) this;
        }

        public Criteria andDeviceNoIsNotNull() {
            addCriterion("device_no is not null");
            return (Criteria) this;
        }

        public Criteria andDeviceNoEqualTo(String value) {
            addCriterion("device_no =", value, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoNotEqualTo(String value) {
            addCriterion("device_no <>", value, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoGreaterThan(String value) {
            addCriterion("device_no >", value, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoGreaterThanOrEqualTo(String value) {
            addCriterion("device_no >=", value, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoLessThan(String value) {
            addCriterion("device_no <", value, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoLessThanOrEqualTo(String value) {
            addCriterion("device_no <=", value, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoLike(String value) {
            addCriterion("device_no like", value, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoNotLike(String value) {
            addCriterion("device_no not like", value, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoIn(List<String> values) {
            addCriterion("device_no in", values, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoNotIn(List<String> values) {
            addCriterion("device_no not in", values, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoBetween(String value1, String value2) {
            addCriterion("device_no between", value1, value2, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andDeviceNoNotBetween(String value1, String value2) {
            addCriterion("device_no not between", value1, value2, "deviceNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoIsNull() {
            addCriterion("tenant_no is null");
            return (Criteria) this;
        }

        public Criteria andTenantNoIsNotNull() {
            addCriterion("tenant_no is not null");
            return (Criteria) this;
        }

        public Criteria andTenantNoEqualTo(String value) {
            addCriterion("tenant_no =", value, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoNotEqualTo(String value) {
            addCriterion("tenant_no <>", value, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoGreaterThan(String value) {
            addCriterion("tenant_no >", value, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoGreaterThanOrEqualTo(String value) {
            addCriterion("tenant_no >=", value, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoLessThan(String value) {
            addCriterion("tenant_no <", value, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoLessThanOrEqualTo(String value) {
            addCriterion("tenant_no <=", value, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoLike(String value) {
            addCriterion("tenant_no like", value, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoNotLike(String value) {
            addCriterion("tenant_no not like", value, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoIn(List<String> values) {
            addCriterion("tenant_no in", values, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoNotIn(List<String> values) {
            addCriterion("tenant_no not in", values, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoBetween(String value1, String value2) {
            addCriterion("tenant_no between", value1, value2, "tenantNo");
            return (Criteria) this;
        }

        public Criteria andTenantNoNotBetween(String value1, String value2) {
            addCriterion("tenant_no not between", value1, value2, "tenantNo");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}